﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RayTracer
{
    class Camera
    {
        private double distance;
        private double fov;
        private Point3D center; // optional
        private double h_orientation; // optional
        private double v_orientation; // optional

        // CONSTRUCTORS
        public Camera()
        {
            this.distance = 0;
            this.fov = 0;
            this.center = new Point3D();
            this.h_orientation = 0;
            this.v_orientation = 0;
        }

        public Camera(double distance, double fov)
        {
            this.distance = distance;
            this.fov = fov;
            this.center = new Point3D();
            this.h_orientation = 0;
            this.v_orientation = 0;
        }

        public Camera(double distance, double fov, Point3D center, double h_orientation, double v_orientation)
        {
            this.distance = distance;
            this.fov = fov;
            this.center = center;
            this.h_orientation = h_orientation;
            this.v_orientation = v_orientation;
        }

        // PROPERTIES
        public double Distance
        {
            get { return this.distance; }
            set { this.distance = value; }
        }

        public double Fov
        {
            get { return this.fov; }
            set { this.fov = value; }
        }

        
        public Point3D Center
        {
            get { return this.center; }
            set { this.center = value; }
        }

        public double HorizontalOrientation
        {
            get { return this.h_orientation; }
            set { this.h_orientation = value; }
        }

        public double VerticalOrientation
        {
            get { return this.v_orientation; }
            set { this.v_orientation = value; }
        }
        

        public Point3D GetPosition() { return new Point3D(0, 0, this.distance); }

        // METHODS
        public string print()
        {
            return "Camera!" + " Distance: " + this.distance + " Fov: " + this.fov + " Center: " + this.center.X + " " + this.center.Y + " " + this.center.Z + " Horizontal Orientation: " + this.h_orientation + " Vertical Orientation: " + this.v_orientation;
        }
    }
}
